<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" action="/Admin/UserRole/index/pid/<?php echo ($paramter['pid']); ?>" method="post">
    <input type="hidden" name="pageNum" value="<?php echo ($page['pageNum']); ?>"/>
<input type="hidden" name="numPerPage" value="<?php echo ($page['numPerPage']); ?>" />
    <input type="hidden" name="pid" value="<?php echo ($paramter['pid']); ?>"/>
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="/Admin/UserRole/index/pid/<?php echo ($paramter['pid']); ?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td></td>
                </tr>
            </table>
            <div class="subBar">
                <!--ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">检索</button>
                            </div>
                        </div>
                    </li>
                </ul-->
            </div>
        </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar" style="background:none;">
        <ul class="toolBar">
        	<?php if($paramter['pid'] > 0): ?><li>
                <a href="/Admin/UserRole/index/pid/<?php echo ($paramter['parent_id']); ?>" class="audit" rel="userrole" target="navTab">
                    <span>返回上层</span>
                </a>
            </li><?php endif; ?>
            <li>
                <a href="/Admin/UserRole/add/pid/<?php echo ($paramter['pid']); ?>" class="add" rel="userrole" target="dialog" title="添加群组">
                    <i class="iconfont">&#xe601;</i>
                    <span>添加</span>
                </a>
            </li>
            <li>
                <a href="/Admin/UserRole/edit/id/{sid_user}" class="edit" rel="userrole" target="dialog" title="编辑群组">
                    <i class="iconfont">&#xe607;</i>
                    <span>编辑</span>
                </a>
            </li>
            <li>
                <a href="/Admin/UserRole/auth/id/{sid_user}" class="password" target="dialog" rel="userrole" title="授权">
                    <i class="iconfont">&#xe62c;</i>
                    <span>授权</span>
                </a>
            </li>
            <li>
                <a href="/Admin/UserRole/remove" class="delete" target="selectedTodo" rel="id" posttype="string" title="你确定要批量删除吗？">
                    <i class="iconfont">&#xe612;</i>
                    <span>删除</span>
                </a>
            </li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="206">
        <thead>
            <tr>
				<th width="3%" class="txtMid">
					<input type="checkbox" group="id" class="checkboxCtrl">
				</th>
				<th width="5%">编号</th>
				<th width="10%">组名</th>
				<th width="10%">上级组</th>
				<th width="35%">描述</th>
				<th width="10%">创建时间</th>
				<th width="5%">排序</th>
				<th width="10%">状态</th>
				<th width="12%">操作</th>
			</tr>
        </thead>
        <tbody>
        <?php if($dataList|count > 0): if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$volist): $mod = ($i % 2 );++$i;?><tr target="sid_user" rel="<?php echo ($volist['id']); ?>" >
                <td class="txtMid">
                	<input name="id" value="<?php echo ($volist['id']); ?>" type="checkbox">
				</td>
                <td><?php echo ( $page['pageNum'] - 1 ) * $page['numperpage'] + ( $key + 1 );?></td>
                <td>
                    <a href="/Admin/UserRole/index/pid/<?php echo ($volist['id']); ?>" class="alink1" target="navTab" rel="userrole" title='菜单分组管理'>
                        <?php echo ($volist['title']); ?>
                    </a>
                </td>
                <td><?php echo ($volist['parent_title']?$volist['parent_title']:'已是顶级'); ?></td>
                <td><?php echo ($volist['intro']); ?></td>
                <td><?php echo (date('Y-m-d H:i:s',$volist['create_time'])); ?></td>
                <td><?php echo ($volist['sort']); ?></td>
                <td>
	                <?php if($volist["status"] == 0): ?><img src="/Public/Admin/Images/ok.png" />
	                <?php else: ?>
	                	<img src="/Public/Admin/Images/error.png" /><?php endif; ?>
                </td>
                <td>
                    <?php if($volist['status'] == 1): ?><a href="/Admin/UserRole/commSetStatus/id/<?php echo ($volist['id']); ?>/param/status-0" target="ajaxTodo" class="color_red">[恢复]</a>
                    <?php else: ?>
						<a href="/Admin/UserRole/commSetStatus/id/<?php echo ($volist['id']); ?>/param/status-1" target="ajaxTodo" class="alink1">[禁用]</a><?php endif; ?>
                </td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        <?php else: ?>
            <tr><td colspan="10" style="text-align:center;">没有数据!!!</td></tr><?php endif; ?>
        </tbody>
    </table>
    <div class="panelBar" style="background:none;">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <?php if(is_array($page['numPerPageArray'])): foreach($page['numPerPageArray'] as $key=>$vo): ?><option value="<?php echo ($vo); ?>"<?php if($vo == $page['numPerPage']): ?>selected='selected'<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; ?>
        </select>
        <span>条，共<?php echo ($page['all']); ?>条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="<?php echo ($page['all']); ?>" numPerPage="<?php echo ($page['numPerPage']); ?>" pageNumShown="10" currentPage="<?php echo ($page['pageNum']); ?>"></div>
</div>
</div>